<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Company;
use common\models\CompanySearch;

/* @var $this yii\web\View */
/* @var $model common\models\Warehouse */
/* @var $form yii\widgets\ActiveForm */
?>
<link rel="stylesheet" href="/static/css/form.css">
<div class="form">

    <?php $form = ActiveForm::begin([
            'options'=>['class' => '','style'=>'padding-top:20px;'],
            'fieldConfig' => [
                'labelOptions' => ['class' => 'layui-form-label'],
                'inputOptions' => ['class' => 'layui-input','style'=>'width:300px'],
            ]
        
    ]); ?>
	<fieldset class="layui-elem-field layui-field-title" >
        <legend><?= $model->isNewRecord?'新增':'修改' ?>仓库资料</legend>
    </fieldset>
    
    <?php echo $form->errorSummary($model); ?>
    
    <table class="table table-bordered table-hover ">
		
		
		<tr>
        	<td width="20%" class="tableleft">仓库名称<span class="required">*</span></td>
        	<td><?= $form->field($model, 'warehouse_name')->textInput(['maxlength' => true])->label(false) ?>
		</td>
  	  	</tr>
  	  	<tr>
        	<td width="20%" class="tableleft">公司<span class="required">*</span></td>
        	<td><?= $form->field($model, 'company_id')->dropDownList(CompanySearch::getAllCompany('','add'),['class' => 'formSelect','style'=>'width:auto;height:38px;border-color:#e6e6e6']) ->label(false) ?>
		</td>
  	  	</tr>
  	  	
  	  	
  	  	<tr>
        	<td width="20%" class="tableleft">是否显示<span class="required">*</span></td>
        	<td><?= $form->field($model, 'is_display')->radioList(['1'=>'显示','0'=>'不显示']) ->label(false) ?>
		</td>
  	  	</tr>  	  	
  	  	<tr>
        	<td width="20%" class="tableleft">排序</td>
        	<td><?= $form->field($model, 'sort')->textInput(['maxlength' => true])->label(false) ?>
		</td>
  	  	</tr>
  	  	<tr>
        	<td width="20%" class="tableleft">备注</td>
        	<td><?= $form->field($model, 'remark')->textInput(['maxlength' => true])->label(false) ?>
		</td>
  	  	</tr>
  	  	

		
		</table>
    
    <!-- 
    

    <?= $form->field($model, 'warehouse_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'remark')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'sort')->textInput() ?>

    <?= $form->field($model, 'is_display')->textInput() ?>

    <?= $form->field($model, 'created_at')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'updated_at')->textInput(['maxlength' => true]) ?>
 -->
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '保存' : '提交修改', ['class' => $model->isNewRecord ? 'layui-btn' : 'layui-btn']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
